drivers/passthrough: fix error paths in pci_add_device*()
authorTim Deegan <Tim.Deegan@citrix.com>
Mon, 23 May 2011 17:35:32 +0000 (18:35 +0100)
committerTim Deegan <Tim.Deegan@citrix.com>
Mon, 23 May 2011 17:35:32 +0000 (18:35 +0100)
commitcd06c7d669ea3d3716cb7e539148b9d4cf66e46f
tree88afeaf2b61b350f35bbe3567424b8654b662d87
parent36a72c1e42900b2f093ca8a2a3aa80ff1558c353
drivers/passthrough: fix error paths in pci_add_device*()

When a device can't be allocated to dom0 by the IOMMU, don't leave
dom0 in the "domain" field.  It causes pci_remove_device()
to crash trying to remove the dev from the domain's list of devices
(and was probably the wrong thing to do anyway).

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
xen/drivers/passthrough/pci.c